﻿@model  ReleaseOrderSearch
<div class="well form-search">
    <form action='@Url.Action("Search")'>
    <div class="layout-onecolumn">
        <div class="display-label">
            @Html.DisplayNameFor(m => m.Status, iscolon: true)</div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Status, BindDropDownList.GetApprovaStates(), "全部")
        </div>
    </div>
    <div class="layout-onecolumn">
        <div class="display-label">
            申请时间：</div>
        <div class="editor-field form-inline">
            @Html.EditorFor(s => s.StartTime)<span style="float: left">-</span>
            @Html.EditorFor(s => s.EndTime)
        </div>
    </div>
    @if (User.IsInRole("FINACE"))
    {        //是否是本人处理
        <div class="layout-onecolumn">
            <div class="display-label">
                @Html.DisplayNameFor(m => m.Approver, iscolon: true)</div>
            <div class="editor-field">
                @Html.DropDownListFor(m => m.Approver, new List<SelectListItem> { new SelectListItem { Text = "不限", Value = "" }, new SelectListItem { Text = "本人", Value = User.Identity.Name } })
            </div>
        </div>
    }
    else
    { 
        @Html.HiddenFor(m => m.Approver)
    }
    @Html.HiddenFor(m => m.ApplyMan)
    @Html.KeywordSearch("账单编号：")
    </form>
    @if (User.IsInRole("FINACE"))
    {
        <button type="button" class="btn btn-primary" onclick="ConfirmOrders()">
            同意</button>
        <button type="button" class="btn btn-primary" onclick="RejectOrders()">
            拒绝</button>
    }
</div>
